<?php

namespace app\controllers;



class Controller extends \yii\web\Controller
{

    protected function json($code, $msg, $data = []){

        return $this->asJson(['code'=> $code,'msg' => $msg, 'data' => $data]);
    }

}